export type LogTiming = 'ENTER' | 'LEAVE' | 'REJECT' | 'NEW' | 'END' | 'DIRECT'
export type LogLevel = 'warn' | 'log' | 'debug' | 'info' | 'error'

export interface IWrappedFunc<F extends (...args: any[]) => any> {
  (...args: Parameters<F>): ReturnType<F>
}
export interface IGlobalLoggerConfig<TLogger> {
  currentTime: () => string;
  console: Console;
  handle?: (Logger: TLogger, whoami: string, uid: number, timing: LogTiming, args: any[], result?: any) => any;
  showArgs: boolean;
  showRet: boolean;
  disabled: boolean;
}
export interface ILoggerOpts<TLogger> extends Partial<IGlobalLoggerConfig<TLogger>> {
  level: LogLevel;
}
export interface ILoggerCreator<TLogger> {
  (opts?: Partial<ILoggerOpts<TLogger>>): TLogger;
}